package org.x.user.dto;

import lombok.Data;
import jakarta.validation.constraints.NotBlank;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 数据源路由规则信息入参实体类
 *
 * @author 夏包包
 * @date 2025-03-08 13:39:03
 */
@Data
public class DsRouterDTO {

    /**
     * 路由规则ID:路由规则ID，必填
     */
    @NotBlank(groups = { DeleteGroup.class, UpdateGroup.class }, message = "路由规则ID不能为空")
    @Schema(description = "路由规则ID:路由规则ID，必填")
    private String id;

    /**
     * 数据源配置ID:数据源配置ID，必填
     */
    @NotBlank(groups = { CreateGroup.class }, message = "数据源配置ID不能为空")
    @Schema(description = "数据源配置ID:数据源配置ID，必填")
    private String dsConfigId;

    /**
     * 路由规则:路由规则
     */
    @Schema(description = "路由规则:路由规则")
    private String routerRule;

    /**
     * 租户ID(空表示全局规则):租户ID(空表示全局规则)
     */
    @Schema(description = "租户ID(空表示全局规则):租户ID(空表示全局规则)")
    private String tenantId;
}
